﻿namespace ExcelTool {
    using System.Text;
    using System.IO;
    using System.Xml;
    using System.Collections.Generic;
    using libxl;

    public partial class Converter {

        public bool StartConvert() {
            if(!Directory.Exists(FILE_PATH.CS_WORKING_DIR)) {
                DirectoryInfo dirInfo = new DirectoryInfo(FILE_PATH.CS_WORKING_DIR);
                dirInfo.Create();
            }

            if(!Directory.Exists(FILE_PATH.CLIENT_JSON_WORKING_DIR)) {
                DirectoryInfo dirInfo = new DirectoryInfo(FILE_PATH.CLIENT_JSON_WORKING_DIR);
                dirInfo.Create();
            }

            if(!Directory.Exists(FILE_PATH.SERVER_JSON_WORKING_DIR)) {
                DirectoryInfo dirInfo = new DirectoryInfo(FILE_PATH.CLIENT_JSON_WORKING_DIR);
                dirInfo.Create();
            }

            if(!jsonConverter()) return false;
            if (!CSharpConverter()) return false;


            return true;
        }


    }
}
